<?php
App::uses('AppModel', 'Model');
/**
 * Category Model
 *
 * @property Item $Item
 */
class Category extends AppModel {


	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * hasMany associations
 *
 * @var array
 */
 public $validate = array(
                'name' => array(
                        'noempty' => array(
                                'rule' => 'notEmpty',
                                'message' => 'Please enter a Category name',
                                'required' => 'create',
                        ),
				'unique' => array(
                                'rule' => array('isUnique'),
                                'message' => 'Category is already in use',
                        ),
					)
				);
	public $hasMany = array(
		'Item' => array(
			'className' => 'Item',
			'foreignKey' => 'category_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
